Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
On load/unload events for DOM elements using a MutationObserver
var onload = require('on-load')
var div = document.createElement('div')
onload(div, function (el) {
console.log('in the dom')
}, function (el) {
console.log('out of the dom')
})
// Will fire the onload
document.body.appendChild(div)
// ... some time later
// Will fire the onunload
document.body.removeChild(div)
onload(node, onloadFn, onunloadFn, [caller])
Pass a dom node
to onload
to have a onloadFn
function fire when the dom node
is added to the document dom
and a onunloadFn
fire when the dom node
is removed from the document dom
. Optionally a caller
ID can be set to associate the onload/onunload hooks with a particular instance of of a dom node
. This is commonly used when 'componentizing' dom nodes.
(c) 2018 Kyle Robinson Young. MIT License
4.0.2 - 2019-03-29
FAQs
On load/unload events for DOM elements using a MutationObserver
The npm package on-load receives a total of 0 weekly downloads. As such, on-load popularity was classified as not popular.
We found that on-load demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.